import request from '@/utils/request'

const api = {
  updatePassword: '/user/updatePassword', //修改密码
  getProvinceList: '/province/getProvinceList', // 获取所有省份
  getCityList: '/province/getCityList', // 获取省份对应的城市
  insertBanner: '/banner/insert', // 插入banner
  deleteBanner: '/banner/delete', // 删除banner
  getBannerList: '/banner/list', // 查询banner列表
  updateBanner: '/banner/update', // 查询banner列表

  insertTechnology: '/technology/insert', // 插入技术支持
  deleteTechnology: '/technology/delete', // 删除技术支持
  getTechnologyList: '/technology/list', // 查询技术支持列表
  updateTechnology: '/technology/update', // 查询技术支持列表

  insertCompany: '/company/insert', // 插入子公司
  deleteCompany: '/company/delete', // 删除子公司
  getCompanyList: '/company/list', // 查询子公司列表
  updateCompany: '/company/update', // 查询子公司列表

  insertDownload: '/download/insert', // 插入下载资料
  deleteDownload: '/download/delete', // 删除下载资料
  getDownloadList: '/download/list', // 查询下载资料
  updateDownload: '/download/update', // 查询下载资料

  insertMessage: '/message/insert', // 插入留言
  deleteMessage: '/message/delete', // 删除留言
  getMessageList: '/message/list', // 查询留言列表
  updateMessage: '/message/update', // 修改留言
  replyMessage: '/message/reply', //回复留言

  getUserList: '/user/list', // 获取用户列表
  getSystemInfo: '/system/list', //查询系统设置信息
  updateSystemInfo: '/system/update', //更新系统设置信息

  insertMenu: '/menu/insert', // 添加菜单
  deleteMenu: '/menu/delete', // 删除菜单
  getMenuList: '/menu/list', // 查询菜单列表
  updateMenu: '/menu/update', // 修改菜单

  getProductList: '/product/list' ,
  insertProductList: '/product/insert' ,
  updateProductList: '/product/update' ,
  deleteProductList: '/product/delete' ,

  getChronicleList: '/chronicle/list' ,
  insertChronicleList: '/chronicle/insert' ,
  updateChronicleList: '/chronicle/update' ,
  deleteChronicleList: '/chronicle/delete' ,

  getVideoList: '/video/list' ,
  insertVideoList: '/video/insert' ,
  updateVideoList: '/video/update' ,
  deleteVideoList: '/video/delete' ,

  getContactWayList: '/contactWay/list',
  insertContactWay: '/contactWay/insert',
  updateContactWay: '/contactWay/update',
  deleteContactWay: '/contactWay/delete',
}

export default api

export function updatePassword (params) {
  return request({
    url: api.updatePassword,
    method: 'post',
    data: params
  })
}
export function getProvinceList (params) {
  return request({
    url: api.getProvinceList,
    method: 'get',
    params: params
  })
}
export function getCityList (params) {
  return request({
    url: api.getCityList,
    method: 'get',
    params: params
  })
}

export function insertBanner (params) {
  return request({
    url: api.insertBanner,
    method: 'post',
    data: params
  })
}
export function deleteBanner (params) {
  return request({
    url: api.deleteBanner,
    method: 'post',
    data: params
  })
}
export function getBannerList (params) {
  return request({
    url: api.getBannerList,
    method: 'get',
    params: params
  })
}
export function updateBanner (params) {
  return request({
    url: api.updateBanner,
    method: 'post',
    data: params
  })
}


export function insertTechnology (params) {
  return request({
    url: api.insertTechnology,
    method: 'post',
    data: params
  })
}
export function deleteTechnology (params) {
  return request({
    url: api.deleteTechnology,
    method: 'post',
    data: params
  })
}
export function getTechnologyList (params) {
  return request({
    url: api.getTechnologyList,
    method: 'get',
    params: params
  })
}
export function updateTechnology (params) {
  return request({
    url: api.updateTechnology,
    method: 'post',
    data: params
  })
}



// 子公司
export function insertCompany (params) {
  return request({
    url: api.insertCompany,
    method: 'post',
    data: params
  })
}
export function deleteCompany (params) {
  return request({
    url: api.deleteCompany,
    method: 'post',
    data: params
  })
}
export function getCompanyList (params) {
  return request({
    url: api.getCompanyList,
    method: 'get',
    params: params
  })
}
export function updateCompany (params) {
  return request({
    url: api.updateCompany,
    method: 'post',
    data: params
  })
}

// 留言
export function insertMessage (params) {
  return request({
    url: api.insertMessage,
    method: 'post',
    data: params
  })
}
export function deleteMessage (params) {
  return request({
    url: api.deleteMessage,
    method: 'post',
    data: params
  })
}
export function getMessageList (params) {
  return request({
    url: api.getMessageList,
    method: 'get',
    params: params
  })
}
export function updateMessage (params) {
  return request({
    url: api.updateMessage,
    method: 'post',
    data: params
  })
}
export function replyMessage (params) {
  return request({
    url: api.replyMessage,
    method: 'post',
    data: params
  })
}
export function getUserList (params) {
  return request({
    url: api.getUserList,
    method: 'get',
    params: params
  })
}
export function getSystemInfo () {
  return request({
    url: api.getSystemInfo,
    method: 'get',
  })
}
export function updateSystemInfo (params) {
  return request({
    url: api.updateSystemInfo,
    method: 'post',
    data: params
  })
}

// 菜单
export function insertMenu (params) {
  return request({
    url: api.insertMenu,
    method: 'post',
    data: params
  })
}
export function deleteMenu (params) {
  return request({
    url: api.deleteMenu,
    method: 'post',
    params: params
  })
}
export function getMenuList (params) {
  return request({
    url: api.getMenuList,
    method: 'get',
    params: params
  })
}
export function updateMenu (params) {
  return request({
    url: api.updateMenu,
    method: 'post',
    data: params
  })
}


//产品
export function getProductList (params) {
  return request({
    url: api.getProductList,
    method: 'get',
    params: params
  })
}
export function insertProduct (params) {
  return request({
    url: api.insertProductList,
    method: 'post',
    data: params
  })
}
export function updateProduct (params) {
  return request({
    url: api.updateProductList,
    method: 'post',
    data: params
  })
}
export function deleteProduct(params) {
  return request({
    url: api.deleteProductList,
    method: 'post',
    data: params
  })
}

// 下载资料
export function insertDownload (params) {
  return request({
    url: api.insertDownload,
    method: 'post',
    data: params
  })
}
export function deleteDownload (params) {
  return request({
    url: api.deleteDownload,
    method: 'post',
    data: params
  })
}
export function getDownloadList (params) {
  return request({
    url: api.getDownloadList,
    method: 'get',
    params: params
  })
}
export function updateDownload (params) {
  return request({
    url: api.updateDownload,
    method: 'post',
    data: params
  })
}


export function insertChronicleList (params) {
  return request({
    url: api.insertChronicleList,
    method: 'post',
    data: params
  })
}
export function deleteChronicleList (params) {
  return request({
    url: api.deleteChronicleList,
    method: 'post',
    data: params
  })
}
export function getChronicleList (params) {
  return request({
    url: api.getChronicleList,
    method: 'get',
    params: params
  })
}
export function updateChronicleList (params) {
  return request({
    url: api.updateChronicleList,
    method: 'post',
    data: params
  })
}


export function insertVideoList (params) {
  return request({
    url: api.insertVideoList,
    method: 'post',
    data: params
  })
}
export function deleteVideoList (params) {
  return request({
    url: api.deleteVideoList,
    method: 'post',
    data: params
  })
}
export function getVideoList (params) {
  return request({
    url: api.getVideoList,
    method: 'get',
    params: params
  })
}
export function updateVideoList (params) {
  return request({
    url: api.updateVideoList,
    method: 'post',
    data: params
  })
}


export function insertContactWay (params) {
  return request({
    url: api.insertContactWay,
    method: 'post',
    data: params
  })
}
export function deleteContactWay (params) {
  return request({
    url: api.deleteContactWay,
    method: 'post',
    data: params
  })
}
export function getContactWayList (params) {
  return request({
    url: api.getContactWayList,
    method: 'get',
    params: params
  })
}
export function updateContactWay (params) {
  return request({
    url: api.updateContactWay,
    method: 'post',
    data: params
  })
}